// 文件
import Index from "../pages/index.vue";
import Login from "../pages/login.vue";

import Hello from "../pages/hello.vue";

import Click from "../pages/base/click.vue";
import Component from "../pages/base/component.vue";
import Render from "../pages/base/render.vue";
import Template from "../pages/base/template.vue";
import Bind from "../pages/base/bind.vue";
import VFor from "../pages/base/v-for.vue";
import VIf from "../pages/base/v-if.vue";
import Refs from "../pages/base/refs.vue";
import Cookie from "../pages/base/cookie.vue";
import Router from "../pages/base/router.vue";

import Form from "../pages/element-ui/form.vue";
import Alert from "../pages/element-ui/alert.vue";
import Page from "../pages/element-ui/page.vue";
import TreeList from "../pages/element-ui/TreeList.vue";
import Button from "../pages/element-ui/button.vue";
import Dialog from "../pages/element-ui/Dialog.vue";
import PopConfirm from "../pages/element-ui/PopConfirm.vue";
import UploadImg from "../pages/element-ui/UploadImg.vue";

import Controller from "../pages/log/Controller.vue";



import Get from "../pages/request/get.vue";
import PostForm from "../pages/request/post-form.vue";
import PostJson from "../pages/request/post-json.vue";

import ESign from "../pages/block/esign";

// 图标库
import Iconfont from "../pages/icon/iconfont.vue";
import ElementUiIcon from "../pages/icon/ElementUiIcon.vue";

import SysMenu from "../pages/sys/SysMenu.vue";

import FrontMenu from "../pages/FrontMenu.vue";

// 巫师3
import WitcherMenu from "../pages/witcher3/WitcherMenu.vue";
import WitcherChars from "../pages/witcher3/WitcherChars.vue";
import WitcherCharsDetail from "../pages/witcher3/WitcherCharsDetail.vue";
import WitcherAlchemy from "../pages/witcher3/WitcherAlchemy.vue";

// 路由列表
export const routes = [
  // 跳转到index页面
  {path: '/', redirect: '/index', hidden: true},
  // 登录页
  {path: '/login', name: 'Login', component: Login, hidden: true},

  // 首页
  {path: '/index', name: "首页", component: Index, hidden: true},

  // 前端菜单
  {path: '/index', name: "首页", component: Index, hidden: true},

  {
    component: Index, path: '', // 一级菜单路径留空
    children:[
      {path:'/menu', component:FrontMenu}
    ]
  },

  {
    path: '/base', name:'基础', icon: 'iconshare', component: Index, // 所有一级菜单的组件是首页
    children: [
      {path: '/base/click', name:'点击事件', component: Click},
      {path: '/base/component', name: '组件导入', component: Component},
      {path: '/base/render', name:'模板渲染', component: Render},
      {path: '/base/template', name: '<template>', component: Template},
      {path: '/base/v-bind', name: 'v-bind', component: Bind},
      {path: '/base/v-for', name: 'v-for', component: VFor},
      {path: '/base/v-if', name: 'v-if', component: VIf},
      {path: '/base/refs', name:'$refs', component: Refs},
      {path: '/base/cookie', name:'cookie', component: Cookie},
      {path: '/base/router', name:'router', component: Router},
    ]
  },

  // element-ui
  {
    path: '/element-ui', component: Index, // 所有一级菜单的组件是首页
    children:[
      {path: '/element-ui/form', component: Form},
      {path: '/element-ui/alert', component: Alert},
      {path: '/element-ui/page', component: Page},
      {path: '/element-ui/TreeList', component: TreeList},
      {path: '/element-ui/button', component: Button},
      {path: '/element-ui/Dialog', component: Dialog},
      {path: '/element-ui/PopConfirm', component: PopConfirm},
      {path: '/element-ui/upload/img', component: UploadImg},
    ]
  },
  {
    path: '/request', name:'web请求', icon: 'iconqq', component: Index, // 所有一级菜单的组件是首页
    children: [
      {path: '/request/get', name:'Get', component: Get},
      {path: '/request/post-form', name:'post-表单', component: PostForm},
      {path: '/request/post-json', name:'post-json', component: PostJson},
    ]
  },

  {
    path: '/block', name:'代码块', icon: 'iconweixin', component: Index, // 所有一级菜单的组件是首页
    children: [
      {path: '/block/eSign', name:'电子签名', component: ESign},
    ]
  },

  {
    path: '/icon', name:'图标库', icon: 'iconpermission', component: Index, // 所有一级菜单的组件是首页
    children: [
      {path: '/icon/iconfont',  component: Iconfont},
      {path: '/icon/element-ui', component: ElementUiIcon},
    ]
  },

  {
    path: '/sys', component: Index,
    children:[
      {path: '/sys/menu', component: SysMenu},
    ]
  },
  // witcher3
  {
    path: '/witcher3', component: Index,
    children:[
      {path: '/witcher3/menu', component: WitcherMenu},
      {path: '/witcher3/characters', component: WitcherChars},
      {path: '/witcher3/characters/detail/:id', component: WitcherCharsDetail},
      {path: '/witcher3/alchemy', component: WitcherAlchemy},
    ]
  },

  {
    path: '/log', component: Index,
    children:[
      {path: '/log/controller', component: Controller},
    ]
  }
  
  
];

export default routes;
